﻿using System.ComponentModel.DataAnnotations;

namespace EmployeeMgrMvc.Models
{
    [MetadataType(typeof(EmployeeMetadata))]
    public partial class Employee
    {
    }

    public class EmployeeMetadata
    {
        [Required(ErrorMessage = "EmployeeId is required.")]
        public object EmployeeID { get; set; }

        [Required(ErrorMessage = "FirstName is required.")]
        public object FirstName { get; set; }

        [Required(ErrorMessage = "LastName is required.")]
        public object LastName { get; set; }

        [StringLength(60, ErrorMessage = "Address must be 60 characters or less")]
        public object Address { get; set; }

        [RegularExpression(@"((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}", ErrorMessage = "HomePhone format unrecognized.")]
        public object HomePhone { get; set; }
    }
}